package models

import (
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

var DB *gorm.DB

type Pppp struct {
	Id   int
	Name string
	Sex  string
}

func init() {
	dsn := "root:123456@tcp(127.0.0.1:3306)/day01"
	var err error
	DB, err = gorm.Open(mysql.Open(dsn))
	if err != nil {
		panic(err)
	}

}
